home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / ODF Release 3 / ODFDev / Draw / Sources / RectShp.h < prev    next >
Encoding:
Text File  |  1996-12-16  |  1.8 KB  |  72 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                RectShp.h
  4. //    Release Version:    $ ODF 3 $
  5. //
  6. //    Author:                Henri Lamiraux
  7. //
  8. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11.  
  12. #ifndef RECTSHP_H
  13. #define RECTSHP_H
  14.  
  15. #ifndef CONSTANT_H
  16. #include "Constant.h"
  17. #endif
  18.  
  19. #ifndef BASESHP_H
  20. #include "BaseShp.h"
  21. #endif
  22.  
  23. #ifndef BOUNDSHP_H
  24. #include "BoundShp.h"
  25. #endif
  26.  
  27. // ----- Foundation Layer -----
  28.  
  29. #ifndef FWRUNTYP_H
  30. #include "FWRunTyp.h"
  31. #endif
  32.  
  33. //========================================================================================
  34. // class CRectShape
  35. //========================================================================================
  36.  
  37. class CRectShape : public CBoundedShape
  38. {
  39. public:
  40.     FW_DECLARE_CLASS
  41.     FW_DECLARE_AUTO(CRectShape)
  42.  
  43. public:
  44.     CRectShape(CDrawPart* drawPart);
  45.     CRectShape(CDrawPart* drawPart, FW_CReadableStream& archive);
  46.     
  47. public:
  48.     virtual ~CRectShape();
  49.  
  50. public:        
  51.     // ----- Archiving -----
  52.     static void*         Read(FW_CReadableStream& stream, FW_ClassTypeConstant type);
  53.  
  54.     // ----- Shape -----
  55.     virtual ODShape*    CalcClipShape(Environment* ev);
  56.     virtual ODShape*    CreateShapeOutline(Environment *ev);
  57.     
  58.     virtual FW_Boolean    HitTest(Environment *ev, FW_CGraphicContext& gc, const FW_CMouseEvent& theMouseEvent) const;
  59.     virtual void        RenderShape(Environment* ev, ODFacet* facet, FW_CGraphicContext& gc);
  60.     
  61.     // ----- Scripting -----
  62.     virtual ODDescType    GetObjectClass() const;
  63.  
  64. protected:
  65.     CRectShape(CDrawPart* drawPart, unsigned short shapeType, unsigned short renderVerb);
  66.  
  67. private:
  68.     virtual void         OutlineShape(FW_CGraphicContext& gc, const FW_CInk& ink, const FW_CStyle& style, const FW_CRect& rect);
  69. };
  70.  
  71. #endif
  72.